/*
* Compute the Peukert constant C_p from a Battery's
* Capacity C at discharge rate D and it's Peukert number n
*/
#include <stdio.h>
#include <math.h>
#include <unistd.h>
#include <stdlib.h>

int main(){
double c, d, c_p, n;
// The Winnning Solar Car
c = 4500;
d = c/3.0;
n=1.08;
c_p= c * pow(d,n-1.0);
printf("c=%6.0f   d=%6.0f   n=%5.3f   c_p=%8.0f\n", c, d, n, c_p);
exit(0);
}


